package java_test;

public class RemoveChartAt {
    public static void main(String[] args) {
        String str = "This is Java Java Java";
        System.out.println(str.substring(2,5));
        System.out.println(removeCharAt(str,3));
    }

    private static String removeCharAt(String str, int i) {
//        return s.substring(0, pos) + s.substring(pos + 1);
        return str.substring(0,i) + str.substring(i + 1);
    }
}
